// Author: Domien Nowicki

#ifndef PIXEL_H
#define PIXEL_H

class Pixel
{
	public:

		Pixel(unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha=255);
		Pixel(unsigned long newrgb=TRANSPARENTCOLOR);
		Pixel(const Pixel& rhs);
		virtual ~Pixel();

		void SetRgb(unsigned long newrgb);
		void SetRed(unsigned int red);
		void SetGreen(unsigned int green);
		void SetBlue(unsigned int blue);
		void SetAlpha(unsigned int alpha);
		void SetOpaque();
		unsigned long GetRgb() const;
		unsigned int GetRed() const;
		unsigned int GetGreen() const;
		unsigned int GetBlue() const;
		unsigned int GetAlpha() const;

		bool IsTransparent() const;
		void SetTransparent();

		Pixel& operator=(const Pixel& rhs);
		bool operator==(const Pixel& rhs);
		bool operator!=(const Pixel& rhs);
	private:

		unsigned long rgb;

		static const unsigned long TRANSPARENTCOLOR = 0x00FFFFFF;
};

#endif // PIXEL_H
